<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
			<style>
			* {
				margin: 0;
				padding: 0;
			}
			
			html,
			body {
				height: 100%;
			}
			
			ul,
			li {
				list-style: none;
			}
			
			img {
				border: 0 none;
			}
			
			a:focus{
				color: #3c89fe;
				
			}
			.manage_header {
				width: 100%;
				height: 50px;
				font-family: "微软雅黑";
				font-size: 14px;
				line-height: 4;
			}
			
			.manage_header div:first-child {
				margin-left: 20px;
				float: left;
				margin-right: 15px;
			}
			
			.manage_header img {
				margin-top: 23px;
				float: left;
				margin-right: 10px;
			}
			
			.manage_header a:last-child {
				float: left;
				cursor: pointer;
				color: #3c89fe;
				text-decoration: none;
			}

		</style>
	</head>

	<body>
		<div>
			<div class="manage_header">
				<div>应用管理 </div>
				<img src="img/than.png" alt="" />
				<a href="manage.jsp" >应用管理</a>
			</div>

		</div>
		
		
		
		
		
		
		
		
		
		
		
		<form action="" method="post" enctype="multipart/form-data">
			<input name="txtName" type="file" id="pic" onchange="loadImage(this)" />
			<input type="submit" name="submit" class="btn" value="上传" />
		</form>
		<script type="text/javascript">
			function loadImage(img) {
				var filePath = img.value;
				var fileExt = filePath.substring(filePath.lastIndexOf("."))
					.toLowerCase();
				if(!checkFileExt(fileExt)) {
					alert("您上传的文件不是APK格式,请重新上传！");
					img.value = "";
					return;
				}
				function checkFileExt(ext) {
					if(!ext.match(/.apk/i)) {
						return false;
					}
					return true;
				}
				if(img.files && img.files[0]) {
					alert('你选择的文件大小' + (img.files[0].size / 1024).toFixed(0) + "kb");
				} else {
					img.select();
					var url = document.selection.createRange().text;
					try {
						var fso = new ActiveXObject("Scripting.FileSystemObject");
					} catch(e) {
						alert('如果你用的是ie8以下 请将安全级别调低！');
					}
					alert("文件大小为：" + (fso.GetFile(url).size / 1024).toFixed(0) + "kb");
				}
			}
		</script>
	</body>

</html>